﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using IronCow;
using System.Windows;

namespace Milkify.ComponentModel
{
    public class PriorityToVisibilityConverter : IValueConverter
    {
        public Visibility NoPriorityVisibility { get; set; }
        public Visibility SomePriorityVisibility { get; set; }

        public PriorityToVisibilityConverter()
        {
            NoPriorityVisibility = Visibility.Collapsed;
            SomePriorityVisibility = Visibility.Visible;
        }

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            TaskPriority priority = (TaskPriority)value;
            if (priority == TaskPriority.None)
                return NoPriorityVisibility;
            return SomePriorityVisibility;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
